function flushErrors(t) {
clearTimeout(flushErrorsTimer);
var e = window.Page && Page.statistics ? Page.statistics.group_id : "";
t && !e && (e = "gid_still_n/a"), e ? _flushErrors(e) : flushErrorsTimer = setTimeout(flushErrors, 3e3);
}

function _flushErrors(t) {
globalErrors.forEach(function(e) {
e.gid || (e.gid = t, window.ToutiaoJSBridge && ToutiaoJSBridge.call("monitor", {
service: MONITOR_SERVICE,
status: 1,
extra: e
}));
});
}

function SelfEvent(t) {
this.channelId = t, this.eventMap = {};
}

JSVERSION = 156;

var globalErrors = [], startTimestamp = Date.now(), flushErrorsTimer;

window.onerror = function(t, e, n, r, i) {
"string" != typeof t && (t = "");
var o = {
version: JSVERSION,
message: t,
col: r,
url: e,
line: n,
timestamp: Date.now() - startTimestamp
};
o.stack = i && i.stack ? (i.stack || i.stacktrace).toString() : "", "ReferenceError: Can't find variable: getElementPosition" !== t && (globalErrors.push(o), 
flushErrors());
}, !function(t, e) {
"function" == typeof define && define.amd ? define(function() {
return e(t);
}) : e(t);
}(this, function(t) {
var e = function() {
function e(t) {
return null == t ? String(t) : X[G.call(t)] || "object";
}
function n(t) {
return "function" == e(t);
}
function r(t) {
return null != t && t == t.window;
}
function i(t) {
return null != t && t.nodeType == t.DOCUMENT_NODE;
}
function o(t) {
return "object" == e(t);
}
function a(t) {
return o(t) && !r(t) && Object.getPrototypeOf(t) == Object.prototype;
}
function s(t) {
var e = !!t && "length" in t && t.length, n = _.type(t);
return "function" != n && !r(t) && ("array" == n || 0 === e || "number" == typeof e && e > 0 && e - 1 in t);
}
function u(t) {
return P.call(t, function(t) {
return null != t;
});
}
function c(t) {
return t.length > 0 ? _.fn.concat.apply([], t) : t;
}
function l(t) {
return t.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase();
}
function f(t) {
return t in F ? F[t] : F[t] = new RegExp("(^|\\s)" + t + "(\\s|$)");
}
function h(t, e) {
return "number" != typeof e || R[l(t)] ? e : e + "px";
}
function p(t) {
var e, n;
return D[t] || (e = k.createElement(t), k.body.appendChild(e), n = getComputedStyle(e, "").getPropertyValue("display"), 
e.parentNode.removeChild(e), "none" == n && (n = "block"), D[t] = n), D[t];
}
function d(t) {
return "children" in t ? M.call(t.children) : _.map(t.childNodes, function(t) {
return 1 == t.nodeType ? t : void 0;
});
}
function m(t, e) {
var n, r = t ? t.length : 0;
for (n = 0; r > n; n++) this[n] = t[n];
this.length = r, this.selector = e || "";
}
function g(t, e, n) {
for (C in e) n && (a(e[C]) || te(e[C])) ? (a(e[C]) && !a(t[C]) && (t[C] = {}), te(e[C]) && !te(t[C]) && (t[C] = []), 
g(t[C], e[C], n)) : e[C] !== w && (t[C] = e[C]);
}
function v(t, e) {
return null == e ? _(t) : _(t).filter(e);
}
function y(t, e, r, i) {
return n(e) ? e.call(t, r, i) : e;
}
function b(t, e, n) {
null == n ? t.removeAttribute(e) : t.setAttribute(e, n);
}
function E(t, e) {
var n = t.className || "", r = n && n.baseVal !== w;
return e === w ? r ? n.baseVal : n : void (r ? n.baseVal = e : t.className = e);
}
function x(t) {
try {
return t ? "true" == t || ("false" == t ? !1 : "null" == t ? null : +t + "" == t ? +t : /^[\[\{]/.test(t) ? _.parseJSON(t) : t) : t;
} catch (e) {
return t;
}
}
function S(t, e) {
e(t);
for (var n = 0, r = t.childNodes.length; r > n; n++) S(t.childNodes[n], e);
}
var w, C, _, T, j, A, O = [], N = O.concat, P = O.filter, M = O.slice, k = t.document, D = {}, F = {}, R = {
"column-count": 1,
columns: 1,
"font-weight": 1,
"line-height": 1,
opacity: 1,
"z-index": 1,
zoom: 1
}, L = /^\s*<(\w+|!)[^>]*>/, I = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, q = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, $ = /^(?:body|html)$/i, z = /([A-Z])/g, J = [ "val", "css", "html", "text", "data", "width", "height", "offset" ], V = [ "after", "prepend", "before", "append" ], H = k.createElement("table"), Z = k.createElement("tr"), B = {
tr: k.createElement("tbody"),
tbody: H,
thead: H,
tfoot: H,
td: Z,
th: Z,
"*": k.createElement("div")
}, U = /complete|loaded|interactive/, W = /^[\w-]*$/, X = {}, G = X.toString, Y = {}, K = k.createElement("div"), Q = {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
}, te = Array.isArray || function(t) {
return t instanceof Array;
};
return Y.matches = function(t, e) {
if (!e || !t || 1 !== t.nodeType) return !1;
var n = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.oMatchesSelector || t.matchesSelector;
if (n) return n.call(t, e);
var r, i = t.parentNode, o = !i;
return o && (i = K).appendChild(t), r = ~Y.qsa(i, e).indexOf(t), o && K.removeChild(t), 
r;
}, j = function(t) {
return t.replace(/-+(.)?/g, function(t, e) {
return e ? e.toUpperCase() : "";
});
}, A = function(t) {
return P.call(t, function(e, n) {
return t.indexOf(e) == n;
});
}, Y.fragment = function(t, e, n) {
var r, i, o;
return I.test(t) && (r = _(k.createElement(RegExp.$1))), r || (t.replace && (t = t.replace(q, "<$1></$2>")), 
e === w && (e = L.test(t) && RegExp.$1), e in B || (e = "*"), o = B[e], o.innerHTML = "" + t, 
r = _.each(M.call(o.childNodes), function() {
o.removeChild(this);
})), a(n) && (i = _(r), _.each(n, function(t, e) {
J.indexOf(t) > -1 ? i[t](e) : i.attr(t, e);
})), r;
}, Y.Z = function(t, e) {
return new m(t, e);
}, Y.isZ = function(t) {
return t instanceof Y.Z;
}, Y.init = function(t, e) {
var r;
if (!t) return Y.Z();
if ("string" == typeof t) if (t = t.trim(), "<" == t[0] && L.test(t)) r = Y.fragment(t, RegExp.$1, e), 
t = null; else {
if (e !== w) return _(e).find(t);
r = Y.qsa(k, t);
} else {
if (n(t)) return _(k).ready(t);
if (Y.isZ(t)) return t;
if (te(t)) r = u(t); else if (o(t)) r = [ t ], t = null; else if (L.test(t)) r = Y.fragment(t.trim(), RegExp.$1, e), 
t = null; else {
if (e !== w) return _(e).find(t);
r = Y.qsa(k, t);
}
}
return Y.Z(r, t);
}, _ = function(t, e) {
return Y.init(t, e);
}, _.extend = function(t) {
var e, n = M.call(arguments, 1);
return "boolean" == typeof t && (e = t, t = n.shift()), n.forEach(function(n) {
g(t, n, e);
}), t;
}, Y.qsa = function(t, e) {
var n, r = "#" == e[0], i = !r && "." == e[0], o = r || i ? e.slice(1) : e, a = W.test(o);
return t.getElementById && a && r ? (n = t.getElementById(o)) ? [ n ] : [] : 1 !== t.nodeType && 9 !== t.nodeType && 11 !== t.nodeType ? [] : M.call(a && !r && t.getElementsByClassName ? i ? t.getElementsByClassName(o) : t.getElementsByTagName(e) : t.querySelectorAll(e));
}, _.contains = k.documentElement.contains ? function(t, e) {
return t !== e && t.contains(e);
} : function(t, e) {
for (;e && (e = e.parentNode); ) if (e === t) return !0;
return !1;
}, _.type = e, _.isFunction = n, _.isWindow = r, _.isArray = te, _.isPlainObject = a, 
_.isEmptyObject = function(t) {
var e;
for (e in t) return !1;
return !0;
}, _.isNumeric = function(t) {
var e = Number(t), n = typeof t;
return null != t && "boolean" != n && ("string" != n || t.length) && !isNaN(e) && isFinite(e) || !1;
}, _.inArray = function(t, e, n) {
return O.indexOf.call(e, t, n);
}, _.camelCase = j, _.trim = function(t) {
return null == t ? "" : String.prototype.trim.call(t);
}, _.uuid = 0, _.support = {}, _.expr = {}, _.noop = function() {}, _.map = function(t, e) {
var n, r, i, o = [];
if (s(t)) for (r = 0; r < t.length; r++) n = e(t[r], r), null != n && o.push(n); else for (i in t) n = e(t[i], i), 
null != n && o.push(n);
return c(o);
}, _.each = function(t, e) {
var n, r;
if (s(t)) {
for (n = 0; n < t.length; n++) if (e.call(t[n], n, t[n]) === !1) return t;
} else for (r in t) if (e.call(t[r], r, t[r]) === !1) return t;
return t;
}, _.grep = function(t, e) {
return P.call(t, e);
}, t.JSON && (_.parseJSON = JSON.parse), _.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(t, e) {
X["[object " + e + "]"] = e.toLowerCase();
}), _.fn = {
constructor: Y.Z,
length: 0,
forEach: O.forEach,
reduce: O.reduce,
push: O.push,
sort: O.sort,
splice: O.splice,
indexOf: O.indexOf,
concat: function() {
var t, e, n = [];
for (t = 0; t < arguments.length; t++) e = arguments[t], n[t] = Y.isZ(e) ? e.toArray() : e;
return N.apply(Y.isZ(this) ? this.toArray() : this, n);
},
map: function(t) {
return _(_.map(this, function(e, n) {
return t.call(e, n, e);
}));
},
slice: function() {
return _(M.apply(this, arguments));
},
ready: function(t) {
return U.test(k.readyState) && k.body ? t(_) : k.addEventListener("DOMContentLoaded", function() {
t(_);
}, !1), this;
},
get: function(t) {
return t === w ? M.call(this) : this[t >= 0 ? t : t + this.length];
},
toArray: function() {
return this.get();
},
size: function() {
return this.length;
},
remove: function() {
return this.each(function() {
null != this.parentNode && this.parentNode.removeChild(this);
});
},
each: function(t) {
return O.every.call(this, function(e, n) {
return t.call(e, n, e) !== !1;
}), this;
},
filter: function(t) {
return n(t) ? this.not(this.not(t)) : _(P.call(this, function(e) {
return Y.matches(e, t);
}));
},
add: function(t, e) {
return _(A(this.concat(_(t, e))));
},
is: function(t) {
return this.length > 0 && Y.matches(this[0], t);
},
not: function(t) {
var e = [];
if (n(t) && t.call !== w) this.each(function(n) {
t.call(this, n) || e.push(this);
}); else {
var r = "string" == typeof t ? this.filter(t) : s(t) && n(t.item) ? M.call(t) : _(t);
this.forEach(function(t) {
r.indexOf(t) < 0 && e.push(t);
});
}
return _(e);
},
has: function(t) {
return this.filter(function() {
return o(t) ? _.contains(this, t) : _(this).find(t).size();
});
},
eq: function(t) {
return -1 === t ? this.slice(t) : this.slice(t, +t + 1);
},
first: function() {
var t = this[0];
return t && !o(t) ? t : _(t);
},
last: function() {
var t = this[this.length - 1];
return t && !o(t) ? t : _(t);
},
find: function(t) {
var e, n = this;
return e = t ? "object" == typeof t ? _(t).filter(function() {
var t = this;
return O.some.call(n, function(e) {
return _.contains(e, t);
});
}) : 1 == this.length ? _(Y.qsa(this[0], t)) : this.map(function() {
return Y.qsa(this, t);
}) : _();
},
closest: function(t, e) {
var n = [], r = "object" == typeof t && _(t);
return this.each(function(o, a) {
for (;a && !(r ? r.indexOf(a) >= 0 : Y.matches(a, t)); ) a = a !== e && !i(a) && a.parentNode;
a && n.indexOf(a) < 0 && n.push(a);
}), _(n);
},
parents: function(t) {
for (var e = [], n = this; n.length > 0; ) n = _.map(n, function(t) {
return (t = t.parentNode) && !i(t) && e.indexOf(t) < 0 ? (e.push(t), t) : void 0;
});
return v(e, t);
},
parent: function(t) {
return v(A(this.pluck("parentNode")), t);
},
children: function(t) {
return v(this.map(function() {
return d(this);
}), t);
},
contents: function() {
return this.map(function() {
return this.contentDocument || M.call(this.childNodes);
});
},
siblings: function(t) {
return v(this.map(function(t, e) {
return P.call(d(e.parentNode), function(t) {
return t !== e;
});
}), t);
},
empty: function() {
return this.each(function() {
this.innerHTML = "";
});
},
pluck: function(t) {
return _.map(this, function(e) {
return e[t];
});
},
show: function() {
return this.each(function() {
"none" == this.style.display && (this.style.display = ""), "none" == getComputedStyle(this, "").getPropertyValue("display") && (this.style.display = p(this.nodeName));
});
},
replaceWith: function(t) {
return this.before(t).remove();
},
wrap: function(t) {
var e = n(t);
if (this[0] && !e) var r = _(t).get(0), i = r.parentNode || this.length > 1;
return this.each(function(n) {
_(this).wrapAll(e ? t.call(this, n) : i ? r.cloneNode(!0) : r);
});
},
wrapAll: function(t) {
if (this[0]) {
_(this[0]).before(t = _(t));
for (var e; (e = t.children()).length; ) t = e.first();
_(t).append(this);
}
return this;
},
wrapInner: function(t) {
var e = n(t);
return this.each(function(n) {
var r = _(this), i = r.contents(), o = e ? t.call(this, n) : t;
i.length ? i.wrapAll(o) : r.append(o);
});
},
unwrap: function() {
return this.parent().each(function() {
_(this).replaceWith(_(this).children());
}), this;
},
clone: function() {
return this.map(function() {
return this.cloneNode(!0);
});
},
hide: function() {
return this.css("display", "none");
},
toggle: function(t) {
return this.each(function() {
var e = _(this);
(t === w ? "none" == e.css("display") : t) ? e.show() : e.hide();
});
},
prev: function(t) {
return _(this.pluck("previousElementSibling")).filter(t || "*");
},
next: function(t) {
return _(this.pluck("nextElementSibling")).filter(t || "*");
},
html: function(t) {
return 0 in arguments ? this.each(function(e) {
var n = this.innerHTML;
_(this).empty().append(y(this, t, e, n));
}) : 0 in this ? this[0].innerHTML : null;
},
text: function(t) {
return 0 in arguments ? this.each(function(e) {
var n = y(this, t, e, this.textContent);
this.textContent = null == n ? "" : "" + n;
}) : 0 in this ? this.pluck("textContent").join("") : null;
},
attr: function(t, e) {
var n;
return "string" != typeof t || 1 in arguments ? this.each(function(n) {
if (1 === this.nodeType) if (o(t)) for (C in t) b(this, C, t[C]); else b(this, t, y(this, e, n, this.getAttribute(t)));
}) : 0 in this && 1 == this[0].nodeType && null != (n = this[0].getAttribute(t)) ? n : w;
},
removeAttr: function(t) {
return this.each(function() {
1 === this.nodeType && t.split(" ").forEach(function(t) {
b(this, t);
}, this);
});
},
prop: function(t, e) {
return t = Q[t] || t, 1 in arguments ? this.each(function(n) {
this[t] = y(this, e, n, this[t]);
}) : this[0] && this[0][t];
},
removeProp: function(t) {
return t = Q[t] || t, this.each(function() {
delete this[t];
});
},
data: function(t, e) {
var n = "data-" + t.replace(z, "-$1").toLowerCase(), r = 1 in arguments ? this.attr(n, e) : this.attr(n);
return null !== r ? x(r) : w;
},
val: function(t) {
return 0 in arguments ? (null == t && (t = ""), this.each(function(e) {
this.value = y(this, t, e, this.value);
})) : this[0] && (this[0].multiple ? _(this[0]).find("option").filter(function() {
return this.selected;
}).pluck("value") : this[0].value);
},
offset: function(e) {
if (e) return this.each(function(t) {
var n = _(this), r = y(this, e, t, n.offset()), i = n.offsetParent().offset(), o = {
top: r.top - i.top,
left: r.left - i.left
};
"static" == n.css("position") && (o.position = "relative"), n.css(o);
});
if (!this.length) return null;
if (k.documentElement !== this[0] && !_.contains(k.documentElement, this[0])) return {
top: 0,
left: 0
};
var n = this[0].getBoundingClientRect();
return {
left: n.left + t.pageXOffset,
top: n.top + t.pageYOffset,
width: Math.round(n.width),
height: Math.round(n.height)
};
},
css: function(t, n) {
if (arguments.length < 2) {
var r = this[0];
if ("string" == typeof t) {
if (!r) return;
return r.style[j(t)] || getComputedStyle(r, "").getPropertyValue(t);
}
if (te(t)) {
if (!r) return;
var i = {}, o = getComputedStyle(r, "");
return _.each(t, function(t, e) {
i[e] = r.style[j(e)] || o.getPropertyValue(e);
}), i;
}
}
var a = "";
if ("string" == e(t)) n || 0 === n ? a = l(t) + ":" + h(t, n) : this.each(function() {
this.style.removeProperty(l(t));
}); else for (C in t) t[C] || 0 === t[C] ? a += l(C) + ":" + h(C, t[C]) + ";" : this.each(function() {
this.style.removeProperty(l(C));
});
return this.each(function() {
this.style.cssText += ";" + a;
});
},
index: function(t) {
return t ? this.indexOf(_(t)[0]) : this.parent().children().indexOf(this[0]);
},
hasClass: function(t) {
return t ? O.some.call(this, function(t) {
return this.test(E(t));
}, f(t)) : !1;
},
addClass: function(t) {
return t ? this.each(function(e) {
if ("className" in this) {
T = [];
var n = E(this), r = y(this, t, e, n);
r.split(/\s+/g).forEach(function(t) {
_(this).hasClass(t) || T.push(t);
}, this), T.length && E(this, n + (n ? " " : "") + T.join(" "));
}
}) : this;
},
removeClass: function(t) {
return this.each(function(e) {
if ("className" in this) {
if (t === w) return E(this, "");
T = E(this), y(this, t, e, T).split(/\s+/g).forEach(function(t) {
T = T.replace(f(t), " ");
}), E(this, T.trim());
}
});
},
toggleClass: function(t, e) {
return t ? this.each(function(n) {
var r = _(this), i = y(this, t, n, E(this));
i.split(/\s+/g).forEach(function(t) {
(e === w ? !r.hasClass(t) : e) ? r.addClass(t) : r.removeClass(t);
});
}) : this;
},
scrollTop: function(t) {
if (this.length) {
var e = "scrollTop" in this[0];
return t === w ? e ? this[0].scrollTop : this[0].pageYOffset : this.each(e ? function() {
this.scrollTop = t;
} : function() {
this.scrollTo(this.scrollX, t);
});
}
},
scrollLeft: function(t) {
if (this.length) {
var e = "scrollLeft" in this[0];
return t === w ? e ? this[0].scrollLeft : this[0].pageXOffset : this.each(e ? function() {
this.scrollLeft = t;
} : function() {
this.scrollTo(t, this.scrollY);
});
}
},
position: function() {
if (this.length) {
var t = this[0], e = this.offsetParent(), n = this.offset(), r = $.test(e[0].nodeName) ? {
top: 0,
left: 0
} : e.offset();
return n.top -= parseFloat(_(t).css("margin-top")) || 0, n.left -= parseFloat(_(t).css("margin-left")) || 0, 
r.top += parseFloat(_(e[0]).css("border-top-width")) || 0, r.left += parseFloat(_(e[0]).css("border-left-width")) || 0, 
{
top: n.top - r.top,
left: n.left - r.left
};
}
},
offsetParent: function() {
return this.map(function() {
for (var t = this.offsetParent || k.body; t && !$.test(t.nodeName) && "static" == _(t).css("position"); ) t = t.offsetParent;
return t;
});
}
}, _.fn.detach = _.fn.remove, [ "width", "height" ].forEach(function(t) {
var e = t.replace(/./, function(t) {
return t[0].toUpperCase();
});
_.fn[t] = function(n) {
var o, a = this[0];
return n === w ? r(a) ? a["inner" + e] : i(a) ? a.documentElement["scroll" + e] : (o = this.offset()) && o[t] : this.each(function(e) {
a = _(this), a.css(t, y(this, n, e, a[t]()));
});
};
}), V.forEach(function(n, r) {
var i = r % 2;
_.fn[n] = function() {
var n, o, a = _.map(arguments, function(t) {
var r = [];
return n = e(t), "array" == n ? (t.forEach(function(t) {
return t.nodeType !== w ? r.push(t) : _.zepto.isZ(t) ? r = r.concat(t.get()) : void (r = r.concat(Y.fragment(t)));
}), r) : "object" == n || null == t ? t : Y.fragment(t);
}), s = this.length > 1;
return a.length < 1 ? this : this.each(function(e, n) {
o = i ? n : n.parentNode, n = 0 == r ? n.nextSibling : 1 == r ? n.firstChild : 2 == r ? n : null;
var u = _.contains(k.documentElement, o);
a.forEach(function(e) {
if (s) e = e.cloneNode(!0); else if (!o) return _(e).remove();
o.insertBefore(e, n), u && S(e, function(e) {
if (!(null == e.nodeName || "SCRIPT" !== e.nodeName.toUpperCase() || e.type && "text/javascript" !== e.type || e.src)) {
var n = e.ownerDocument ? e.ownerDocument.defaultView : t;
n.eval.call(n, e.innerHTML);
}
});
});
});
}, _.fn[i ? n + "To" : "insert" + (r ? "Before" : "After")] = function(t) {
return _(t)[n](this), this;
};
}), Y.Z.prototype = m.prototype = _.fn, Y.uniq = A, Y.deserializeValue = x, _.zepto = Y, 
_;
}();
return t.Zepto = e, void 0 === t.$ && (t.$ = e), function(e) {
function n(t) {
return t._zid || (t._zid = p++);
}
function r(t, e, r, a) {
if (e = i(e), e.ns) var s = o(e.ns);
return (v[n(t)] || []).filter(function(t) {
return !(!t || e.e && t.e != e.e || e.ns && !s.test(t.ns) || r && n(t.fn) !== n(r) || a && t.sel != a);
});
}
function i(t) {
var e = ("" + t).split(".");
return {
e: e[0],
ns: e.slice(1).sort().join(" ")
};
}
function o(t) {
return new RegExp("(?:^| )" + t.replace(" ", " .* ?") + "(?: |$)");
}
function a(t, e) {
return t.del && !b && t.e in E || !!e;
}
function s(t) {
return x[t] || b && E[t] || t;
}
function u(t, r, o, u, c, f, p) {
var d = n(t), m = v[d] || (v[d] = []);
r.split(/\s/).forEach(function(n) {
if ("ready" == n) return e(document).ready(o);
var r = i(n);
r.fn = o, r.sel = c, r.e in x && (o = function(t) {
var n = t.relatedTarget;
return !n || n !== this && !e.contains(this, n) ? r.fn.apply(this, arguments) : void 0;
}), r.del = f;
var d = f || o;
r.proxy = function(e) {
if (e = l(e), !e.isImmediatePropagationStopped()) {
e.data = u;
var n = d.apply(t, e._args == h ? [ e ] : [ e ].concat(e._args));
return n === !1 && (e.preventDefault(), e.stopPropagation()), n;
}
}, r.i = m.length, m.push(r), "addEventListener" in t && t.addEventListener(s(r.e), r.proxy, a(r, p));
});
}
function c(t, e, i, o, u) {
var c = n(t);
(e || "").split(/\s/).forEach(function(e) {
r(t, e, i, o).forEach(function(e) {
delete v[c][e.i], "removeEventListener" in t && t.removeEventListener(s(e.e), e.proxy, a(e, u));
});
});
}
function l(t, n) {
return (n || !t.isDefaultPrevented) && (n || (n = t), e.each(_, function(e, r) {
var i = n[e];
t[e] = function() {
return this[r] = S, i && i.apply(n, arguments);
}, t[r] = w;
}), t.timeStamp || (t.timeStamp = Date.now()), (n.defaultPrevented !== h ? n.defaultPrevented : "returnValue" in n ? n.returnValue === !1 : n.getPreventDefault && n.getPreventDefault()) && (t.isDefaultPrevented = S)), 
t;
}
function f(t) {
var e, n = {
originalEvent: t
};
for (e in t) C.test(e) || t[e] === h || (n[e] = t[e]);
return l(n, t);
}
var h, p = 1, d = Array.prototype.slice, m = e.isFunction, g = function(t) {
return "string" == typeof t;
}, v = {}, y = {}, b = "onfocusin" in t, E = {
focus: "focusin",
blur: "focusout"
}, x = {
mouseenter: "mouseover",
mouseleave: "mouseout"
};
y.click = y.mousedown = y.mouseup = y.mousemove = "MouseEvents", e.event = {
add: u,
remove: c
}, e.proxy = function(t, r) {
var i = 2 in arguments && d.call(arguments, 2);
if (m(t)) {
var o = function() {
return t.apply(r, i ? i.concat(d.call(arguments)) : arguments);
};
return o._zid = n(t), o;
}
if (g(r)) return i ? (i.unshift(t[r], t), e.proxy.apply(null, i)) : e.proxy(t[r], t);
throw new TypeError("expected function");
}, e.fn.bind = function(t, e, n) {
return this.on(t, e, n);
}, e.fn.unbind = function(t, e) {
return this.off(t, e);
}, e.fn.one = function(t, e, n, r) {
return this.on(t, e, n, r, 1);
};
var S = function() {
return !0;
}, w = function() {
return !1;
}, C = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/, _ = {
preventDefault: "isDefaultPrevented",
stopImmediatePropagation: "isImmediatePropagationStopped",
stopPropagation: "isPropagationStopped"
};
e.fn.delegate = function(t, e, n) {
return this.on(e, t, n);
}, e.fn.undelegate = function(t, e, n) {
return this.off(e, t, n);
}, e.fn.live = function(t, n) {
return e(document.body).delegate(this.selector, t, n), this;
}, e.fn.die = function(t, n) {
return e(document.body).undelegate(this.selector, t, n), this;
}, e.fn.on = function(t, n, r, i, o) {
var a, s, l = this;
return t && !g(t) ? (e.each(t, function(t, e) {
l.on(t, n, r, e, o);
}), l) : (g(n) || m(i) || i === !1 || (i = r, r = n, n = h), (i === h || r === !1) && (i = r, 
r = h), i === !1 && (i = w), l.each(function(l, h) {
o && (a = function(t) {
return c(h, t.type, i), i.apply(this, arguments);
}), n && (s = function(t) {
var r, o = e(t.target).closest(n, h).get(0);
return o && o !== h ? (r = e.extend(f(t), {
currentTarget: o,
liveFired: h
}), (a || i).apply(o, [ r ].concat(d.call(arguments, 1)))) : void 0;
}), u(h, t, i, r, n, s || a);
}));
}, e.fn.off = function(t, n, r) {
var i = this;
return t && !g(t) ? (e.each(t, function(t, e) {
i.off(t, n, e);
}), i) : (g(n) || m(r) || r === !1 || (r = n, n = h), r === !1 && (r = w), i.each(function() {
c(this, t, r, n);
}));
}, e.fn.trigger = function(t, n) {
return t = g(t) || e.isPlainObject(t) ? e.Event(t) : l(t), t._args = n, this.each(function() {
t.type in E && "function" == typeof this[t.type] ? this[t.type]() : "dispatchEvent" in this ? this.dispatchEvent(t) : e(this).triggerHandler(t, n);
});
}, e.fn.triggerHandler = function(t, n) {
var i, o;
return this.each(function(a, s) {
i = f(g(t) ? e.Event(t) : t), i._args = n, i.target = s, e.each(r(s, t.type || t), function(t, e) {
return o = e.proxy(i), i.isImmediatePropagationStopped() ? !1 : void 0;
});
}), o;
}, "focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t) {
e.fn[t] = function(e) {
return 0 in arguments ? this.bind(t, e) : this.trigger(t);
};
}), e.Event = function(t, e) {
g(t) || (e = t, t = e.type);
var n = document.createEvent(y[t] || "Events"), r = !0;
if (e) for (var i in e) "bubbles" == i ? r = !!e[i] : n[i] = e[i];
return n.initEvent(t, r, !0), l(n);
};
}(e), function(e) {
function n(t, n, r) {
var i = e.Event(n);
return e(t).trigger(i, r), !i.isDefaultPrevented();
}
function r(t, e, r, i) {
return t.global ? n(e || E, r, i) : void 0;
}
function i(t) {
t.global && 0 === e.active++ && r(t, null, "ajaxStart");
}
function o(t) {
t.global && !--e.active && r(t, null, "ajaxStop");
}
function a(t, e) {
var n = e.context;
return e.beforeSend.call(n, t, e) === !1 || r(e, n, "ajaxBeforeSend", [ t, e ]) === !1 ? !1 : void r(e, n, "ajaxSend", [ t, e ]);
}
function s(t, e, n, i) {
var o = n.context, a = "success";
n.success.call(o, t, a, e), i && i.resolveWith(o, [ t, a, e ]), r(n, o, "ajaxSuccess", [ e, n, t ]), 
c(a, e, n);
}
function u(t, e, n, i, o) {
var a = i.context;
i.error.call(a, n, e, t), o && o.rejectWith(a, [ n, e, t ]), r(i, a, "ajaxError", [ n, i, t || e ]), 
c(e, n, i);
}
function c(t, e, n) {
var i = n.context;
n.complete.call(i, e, t), r(n, i, "ajaxComplete", [ e, n ]), o(n);
}
function l(t, e, n) {
if (n.dataFilter == f) return t;
var r = n.context;
return n.dataFilter.call(r, t, e);
}
function f() {}
function h(t) {
return t && (t = t.split(";", 2)[0]), t && (t == _ ? "html" : t == C ? "json" : S.test(t) ? "script" : w.test(t) && "xml") || "text";
}
function p(t, e) {
return "" == e ? t : (t + "&" + e).replace(/[&?]{1,2}/, "?");
}
function d(t) {
t.processData && t.data && "string" != e.type(t.data) && (t.data = e.param(t.data, t.traditional)), 
!t.data || t.type && "GET" != t.type.toUpperCase() && "jsonp" != t.dataType || (t.url = p(t.url, t.data), 
t.data = void 0);
}
function m(t, n, r, i) {
return e.isFunction(n) && (i = r, r = n, n = void 0), e.isFunction(r) || (i = r, 
r = void 0), {
url: t,
data: n,
success: r,
dataType: i
};
}
function g(t, n, r, i) {
var o, a = e.isArray(n), s = e.isPlainObject(n);
e.each(n, function(n, u) {
o = e.type(u), i && (n = r ? i : i + "[" + (s || "object" == o || "array" == o ? n : "") + "]"), 
!i && a ? t.add(u.name, u.value) : "array" == o || !r && "object" == o ? g(t, u, r, n) : t.add(n, u);
});
}
var v, y, b = +new Date(), E = t.document, x = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, S = /^(?:text|application)\/javascript/i, w = /^(?:text|application)\/xml/i, C = "application/json", _ = "text/html", T = /^\s*$/, j = E.createElement("a");
j.href = t.location.href, e.active = 0, e.ajaxJSONP = function(n, r) {
if (!("type" in n)) return e.ajax(n);
var i, o, c = n.jsonpCallback, l = (e.isFunction(c) ? c() : c) || "Zepto" + b++, f = E.createElement("script"), h = t[l], p = function(t) {
e(f).triggerHandler("error", t || "abort");
}, d = {
abort: p
};
return r && r.promise(d), e(f).on("load error", function(a, c) {
clearTimeout(o), e(f).off().remove(), "error" != a.type && i ? s(i[0], d, n, r) : u(null, c || "error", d, n, r), 
t[l] = h, i && e.isFunction(h) && h(i[0]), h = i = void 0;
}), a(d, n) === !1 ? (p("abort"), d) : (t[l] = function() {
i = arguments;
}, f.src = n.url.replace(/\?(.+)=\?/, "?$1=" + l), E.head.appendChild(f), n.timeout > 0 && (o = setTimeout(function() {
p("timeout");
}, n.timeout)), d);
}, e.ajaxSettings = {
type: "GET",
beforeSend: f,
success: f,
error: f,
complete: f,
context: null,
global: !0,
xhr: function() {
return new t.XMLHttpRequest();
},
accepts: {
script: "text/javascript, application/javascript, application/x-javascript",
json: C,
xml: "application/xml, text/xml",
html: _,
text: "text/plain"
},
crossDomain: !1,
timeout: 0,
processData: !0,
cache: !0,
dataFilter: f
}, e.ajax = function(n) {
var r, o, c = e.extend({}, n || {}), m = e.Deferred && e.Deferred();
for (v in e.ajaxSettings) void 0 === c[v] && (c[v] = e.ajaxSettings[v]);
i(c), c.crossDomain || (r = E.createElement("a"), r.href = c.url, r.href = r.href, 
c.crossDomain = j.protocol + "//" + j.host != r.protocol + "//" + r.host), c.url || (c.url = t.location.toString()), 
(o = c.url.indexOf("#")) > -1 && (c.url = c.url.slice(0, o)), d(c);
var g = c.dataType, b = /\?.+=\?/.test(c.url);
if (b && (g = "jsonp"), c.cache !== !1 && (n && n.cache === !0 || "script" != g && "jsonp" != g) || (c.url = p(c.url, "_=" + Date.now())), 
"jsonp" == g) return b || (c.url = p(c.url, c.jsonp ? c.jsonp + "=?" : c.jsonp === !1 ? "" : "callback=?")), 
e.ajaxJSONP(c, m);
var x, S = c.accepts[g], w = {}, C = function(t, e) {
w[t.toLowerCase()] = [ t, e ];
}, _ = /^([\w-]+:)\/\//.test(c.url) ? RegExp.$1 : t.location.protocol, A = c.xhr(), O = A.setRequestHeader;
if (m && m.promise(A), c.crossDomain || C("X-Requested-With", "XMLHttpRequest"), 
C("Accept", S || "*/*"), (S = c.mimeType || S) && (S.indexOf(",") > -1 && (S = S.split(",", 2)[0]), 
A.overrideMimeType && A.overrideMimeType(S)), (c.contentType || c.contentType !== !1 && c.data && "GET" != c.type.toUpperCase()) && C("Content-Type", c.contentType || "application/x-www-form-urlencoded"), 
c.headers) for (y in c.headers) C(y, c.headers[y]);
if (A.setRequestHeader = C, A.onreadystatechange = function() {
if (4 == A.readyState) {
A.onreadystatechange = f, clearTimeout(x);
var t, n = !1;
if (A.status >= 200 && A.status < 300 || 304 == A.status || 0 == A.status && "file:" == _) {
if (g = g || h(c.mimeType || A.getResponseHeader("content-type")), "arraybuffer" == A.responseType || "blob" == A.responseType) t = A.response; else {
t = A.responseText;
try {
t = l(t, g, c), "script" == g ? (1, eval)(t) : "xml" == g ? t = A.responseXML : "json" == g && (t = T.test(t) ? null : e.parseJSON(t));
} catch (r) {
n = r;
}
if (n) return u(n, "parsererror", A, c, m);
}
s(t, A, c, m);
} else u(A.statusText || null, A.status ? "error" : "abort", A, c, m);
}
}, a(A, c) === !1) return A.abort(), u(null, "abort", A, c, m), A;
var N = "async" in c ? c.async : !0;
if (A.open(c.type, c.url, N, c.username, c.password), c.xhrFields) for (y in c.xhrFields) A[y] = c.xhrFields[y];
for (y in w) O.apply(A, w[y]);
return c.timeout > 0 && (x = setTimeout(function() {
A.onreadystatechange = f, A.abort(), u(null, "timeout", A, c, m);
}, c.timeout)), A.send(c.data ? c.data : null), A;
}, e.get = function() {
return e.ajax(m.apply(null, arguments));
}, e.post = function() {
var t = m.apply(null, arguments);
return t.type = "POST", e.ajax(t);
}, e.getJSON = function() {
var t = m.apply(null, arguments);
return t.dataType = "json", e.ajax(t);
}, e.fn.load = function(t, n, r) {
if (!this.length) return this;
var i, o = this, a = t.split(/\s/), s = m(t, n, r), u = s.success;
return a.length > 1 && (s.url = a[0], i = a[1]), s.success = function(t) {
o.html(i ? e("<div>").html(t.replace(x, "")).find(i) : t), u && u.apply(o, arguments);
}, e.ajax(s), this;
};
var A = encodeURIComponent;
e.param = function(t, n) {
var r = [];
return r.add = function(t, n) {
e.isFunction(n) && (n = n()), null == n && (n = ""), this.push(A(t) + "=" + A(n));
}, g(r, t, n), r.join("&").replace(/%20/g, "+");
};
}(e), function(t) {
t.fn.serializeArray = function() {
var e, n, r = [], i = function(t) {
return t.forEach ? t.forEach(i) : void r.push({
name: e,
value: t
});
};
return this[0] && t.each(this[0].elements, function(r, o) {
n = o.type, e = o.name, e && "fieldset" != o.nodeName.toLowerCase() && !o.disabled && "submit" != n && "reset" != n && "button" != n && "file" != n && ("radio" != n && "checkbox" != n || o.checked) && i(t(o).val());
}), r;
}, t.fn.serialize = function() {
var t = [];
return this.serializeArray().forEach(function(e) {
t.push(encodeURIComponent(e.name) + "=" + encodeURIComponent(e.value));
}), t.join("&");
}, t.fn.submit = function(e) {
if (0 in arguments) this.bind("submit", e); else if (this.length) {
var n = t.Event("submit");
this.eq(0).trigger(n), n.isDefaultPrevented() || this.get(0).submit();
}
return this;
};
}(e), function() {
try {
getComputedStyle(void 0);
} catch (e) {
var n = getComputedStyle;
t.getComputedStyle = function(t, e) {
try {
return n(t, e);
} catch (r) {
return null;
}
};
}
}(), e;
}), _ = {}, _.escape = function() {
var t = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"`": "&#x60;"
}, e = function(e) {
return t[e];
}, n = "(?:" + Object.keys(t).join("|") + ")", r = RegExp(n), i = RegExp(n, "g");
return function(t) {
return t = null == t ? "" : "" + t, r.test(t) ? t.replace(i, e) : t;
};
}(), _.isFunction = function(t) {
return "[object Function]" === Object.prototype.toString.call(t);
}, "function" != typeof /./ && "object" != typeof Int8Array && (_.isFunction = function(t) {
return "function" == typeof t || !1;
}), _.has = function(t, e) {
return null != t && Object.prototype.hasOwnProperty.call(t, e);
};

var eq = function(t, e, n, r) {
if (t === e) return 0 !== t || 1 / t === 1 / e;
if (null == t || null == e) return t === e;
var i = toString.call(t);
if (i !== toString.call(e)) return !1;
switch (i) {
case "[object RegExp]":
case "[object String]":
return "" + t == "" + e;

case "[object Number]":
return +t !== +t ? +e !== +e : 0 === +t ? 1 / +t === 1 / e : +t === +e;

case "[object Date]":
case "[object Boolean]":
return +t === +e;
}
var o = "[object Array]" === i;
if (!o) {
if ("object" != typeof t || "object" != typeof e) return !1;
var a = t.constructor, s = e.constructor;
if (a !== s && !(_.isFunction(a) && a instanceof a && _.isFunction(s) && s instanceof s) && "constructor" in t && "constructor" in e) return !1;
}
n = n || [], r = r || [];
for (var u = n.length; u--; ) if (n[u] === t) return r[u] === e;
if (n.push(t), r.push(e), o) {
if (u = t.length, u !== e.length) return !1;
for (;u--; ) if (!eq(t[u], e[u], n, r)) return !1;
} else {
var c, l = Object.keys(t);
if (u = l.length, Object.keys(e).length !== u) return !1;
for (;u--; ) if (c = l[u], !_.has(e, c) || !eq(t[c], e[c], n, r)) return !1;
}
return n.pop(), r.pop(), !0;
};

_.isEqual = function(t, e) {
return eq(t, e);
}, _.now = Date.now || function() {
return new Date().getTime();
}, _.throttle = function(t, e, n) {
var r, i, o, a = null, s = 0;
n || (n = {});
var u = function() {
s = n.leading === !1 ? 0 : _.now(), a = null, o = t.apply(r, i), a || (r = i = null);
};
return function() {
var c = _.now();
s || n.leading !== !1 || (s = c);
var l = e - (c - s);
return r = this, i = arguments, 0 >= l || l > e ? (a && (clearTimeout(a), a = null), 
s = c, o = t.apply(r, i), a || (r = i = null)) : a || n.trailing === !1 || (a = setTimeout(u, l)), 
o;
};
}, !function() {
function t(t) {
if (void 0 === t) return t;
var e, n, r, i, o, a;
for (r = t.length, n = 0, e = ""; r > n; ) {
if (i = 255 & t.charCodeAt(n++), n == r) {
e += d.charAt(i >> 2), e += d.charAt((3 & i) << 4), e += "==";
break;
}
if (o = t.charCodeAt(n++), n == r) {
e += d.charAt(i >> 2), e += d.charAt((3 & i) << 4 | (240 & o) >> 4), e += d.charAt((15 & o) << 2), 
e += "=";
break;
}
a = t.charCodeAt(n++), e += d.charAt(i >> 2), e += d.charAt((3 & i) << 4 | (240 & o) >> 4), 
e += d.charAt((15 & o) << 2 | (192 & a) >> 6), e += d.charAt(63 & a);
}
return e;
}
function e(t) {
for (var e in t) return !1;
return !0;
}
function n(t, n) {
var r = 100;
if ("share" == t) {
if (n && !e(n)) return n;
var i = "", o = "", a = "", s = document.querySelector("title"), u = document.querySelector("meta[name=description]"), c = document.querySelector("link[rel*=apple-touch-icon]"), l = document.querySelector("link[rel*=shortcut]");
if (s && (i = s.innerText), u && (o = u.content), l && (a = l.href), c && (a = c.href), 
!a) for (var f = document.querySelectorAll("body img"), h = 0; h < f.length; h++) {
var p = f[h];
if (p.naturalWidth > r && p.naturalHeight > r) {
a = p.src;
break;
}
}
return {
platform: "weixin_moments",
url: location.href,
title: i,
desc: o,
image: a
};
}
return n;
}
function r() {
h = document.createElement("iframe"), h.id = "__ToutiaoJSBridgeIframe_SetResult", 
h.style.display = "none", document.documentElement.appendChild(h), f = document.createElement("iframe"), 
f.id = "__ToutiaoJSBridgeIframe", f.style.display = "none", document.documentElement.appendChild(f);
}
function i() {
var t = JSON.stringify(m);
return m = [], a("SCENE_FETCHQUEUE", t), t;
}
function o(t) {
var e, n = t.__msg_type, r = t.__params, i = t.__event_id, o = t.__callback_id;
return "callback" == n ? (e = {
__err_code: "cb404"
}, "string" == typeof o && "function" == typeof v[o] && (e = v[o](r), delete v[o])) : "event" == n && (e = {
__err_code: "ev404"
}, "string" == typeof i && "function" == typeof y[i] && (e = y[i](r))), a("SCENE_HANDLEMSGFROMTT", JSON.stringify(e)), 
JSON.stringify(e);
}
function a(e, n) {
h.src = b + "private/setresult/" + e + "&" + t(p.encode(n));
}
function s(t, e, r, i) {
if (i = i || 1, t && "string" == typeof t) {
"object" != typeof e && (e = {}), e = n(t, e);
var o = (g++).toString();
"function" == typeof r && (v[o] = r);
var a = {
JSSDK: i,
func: t,
params: e,
__msg_type: "call",
__callback_id: o
};
m.push(a), f.src = b + "dispatch_message/";
}
}
function u(t, e) {
t && "string" == typeof t && "function" == typeof e && (y[t] = e, s("addEventListener", {
name: t
}, null));
}
function c(t, e) {
"function" == typeof y[t] && y[t](e);
}
function l() {
function t(t, e) {
return "params" == e ? t : t[e];
}
var n = {
pageStateChange: "page_state_change",
isVisible: "is_visible",
isLogin: "is_login",
uploadImage: "upload_image"
}, r = [ "appInfo", "login", "comment", "close", "isVisible", "isLogin", "playVideo" ], i = [ "isAppInstalled", "open", "share", "systemShare", "pay", "pageStateChange", "downloadApp", "openThirdApp", "uploadImage", "addChannel", "gallery", "copyToClipboard", "openCocosPlay" ], o = r.concat(i), a = navigator.userAgent.match(/JSSDK\/([\d.]+)/i), u = a ? a[1] : 1;
a ? o = o.concat([ "config" ]) : toutiao.config = function(e) {
var n = t(e, "success");
return n ? n({
code: 1,
supportList: {
call: r
}
}) : void 0;
}, o.forEach(function(r) {
toutiao[r] = function(i) {
i = i || {};
var o = t(i, "params"), a = t(i, "error"), c = t(i, "success"), l = t(i, "fail");
r = n[r] || r, s(r, o, function(t) {
t = t || {};
var n = t.code;
e(t) ? n = 1 : void 0 == n && (n = 1), -1 == n && a && a(t), 0 == n && l && l(t), 
1 == n && c && c(t);
}, u);
};
});
}
var f, h, p = {
encode: function(t) {
t = t || "", t = t.replace(/\r\n/g, "\n");
for (var e = "", n = 0; n < t.length; n++) {
var r = t.charCodeAt(n);
128 > r ? e += String.fromCharCode(r) : r > 127 && 2048 > r ? (e += String.fromCharCode(r >> 6 | 192), 
e += String.fromCharCode(63 & r | 128)) : (e += String.fromCharCode(r >> 12 | 224), 
e += String.fromCharCode(r >> 6 & 63 | 128), e += String.fromCharCode(63 & r | 128));
}
return e;
},
decode: function(t) {
for (var e = "", n = 0, r = c1 = c2 = 0; n < t.length; ) r = t.charCodeAt(n), 128 > r ? (e += String.fromCharCode(r), 
n++) : r > 191 && 224 > r ? (c2 = t.charCodeAt(n + 1), e += String.fromCharCode((31 & r) << 6 | 63 & c2), 
n += 2) : (c2 = t.charCodeAt(n + 1), c3 = t.charCodeAt(n + 2), e += String.fromCharCode((15 & r) << 12 | (63 & c2) << 6 | 63 & c3), 
n += 3);
return e;
}
}, d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", m = [], g = 1e3, v = {}, y = {}, b = "bytedance://";
window.ToutiaoJSBridge = {
call: s,
on: u,
_fetchQueue: i,
_handleMessageFromToutiao: o
}, window.toutiao = {
on: u,
trigger: c
}, r(), l();
}(), !function(t) {
"use strict";
function e() {
var e = this;
e.reads = [], e.writes = [], e.raf = u.bind(t), s("initialized", e);
}
function n(t) {
t.scheduled || (t.scheduled = !0, t.raf(r.bind(null, t)), s("flush scheduled"));
}
function r(t) {
s("flush");
var e, r = t.writes, o = t.reads;
try {
s("flushing reads", o.length), i(o), s("flushing writes", r.length), i(r);
} catch (a) {
e = a;
}
if (t.scheduled = !1, (o.length || r.length) && n(t), e) {
if (s("task errored", e.message), !t.catch) throw e;
t.catch(e);
}
}
function i(t) {
s("run tasks");
for (var e; e = t.shift(); ) e();
}
function o(t, e) {
var n = t.indexOf(e);
return !!~n && !!t.splice(n, 1);
}
function a(t, e) {
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
}
var s = function() {}, u = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.msRequestAnimationFrame || function(t) {
return setTimeout(t, 16);
};
e.prototype = {
constructor: e,
measure: function(t, e) {
s("measure");
var r = e ? t.bind(e) : t;
return this.reads.push(r), n(this), r;
},
mutate: function(t, e) {
s("mutate");
var r = e ? t.bind(e) : t;
return this.writes.push(r), n(this), r;
},
clear: function(t) {
return s("clear", t), o(this.reads, t) || o(this.writes, t);
},
extend: function(t) {
if (s("extend", t), "object" != typeof t) throw new Error("expected object");
var e = Object.create(this);
return a(e, t), e.fastdom = this, e.initialize && e.initialize(), e;
},
"catch": null
};
var c = t.fastdom = t.fastdom || new e();
"f" == (typeof define)[0] ? define(function() {
return c;
}) : "o" == (typeof module)[0] && (module.exports = c);
}("undefined" != typeof window ? window : this), !function() {
function t() {
var t = "Android";
return l.match(/(Android)\s+([\d.]+)/) && (t = "Android_" + l.match(/(Android)\s+([\d.]+)/)[2]), 
(l.match(/(iPad).*OS\s([\d_]+)/) || l.match(/(iPhone\sOS)\s([\d_]+)/)) && (t = "iOS_" + (l.match(/(iPad).*OS\s([\d_]+)/) ? l.match(/(iPad).*OS\s([\d_]+)/)[2] : l.match(/(iPhone\sOS)\s([\d_]+)/)[2])), 
l.match(/Windows Phone/) && (t = "WP"), t;
}
function e() {
var t = l.match(/NetType\/([^\s]*)/i), e = "WIFI";
return t && (e = t[1]), e;
}
function n() {
var n = {
net_type: e(),
system: t(),
event: "pv"
};
h.push(n);
}
function r() {
h.forEach(function(t) {
t = t || {};
for (var e in f) t[e] = f[e];
var n = [];
for (var r in t) n.push(r + "=" + t[r]);
var i = new Image(), a = u + "?" + n.join("&");
i.src = a;
var s = o, l = s.percent;
if (Math.floor(1e3 * Math.random()) < l) {
var h = c.replace("{PATHNAME}", t.pathname);
h += "?" + n.join("&");
var p = new Image();
p.src = h;
}
}), h = [];
}
function i() {
s || (s = setTimeout(function() {
r(), s = null;
}, 1e3));
}
var o = {
percent: 1,
pathname: "app_article_detail"
}, a = location.protocol;
a = "http:" !== a && "https:" !== a ? "https:" : "";
var s, u = a + "//www.toutiao.com/__utm.gif", c = a + "//m.toutiao.com/log/sentry/v2/api/{PATHNAME}/perf/", l = navigator.userAgent, f = {}, h = [];
f.pathname = o.pathname, f.hostname = location.hostname, f._ta = "TA." + Math.random() + "." + Date.now(), 
window.sendToutiaoGifLog = r, window.sendTTCustomizeLog = function(t, e) {
t = t + "_" + APP_VERSION + "_" + CLIENT_VERSION, h.push({
tt_perf_key: [ t, e ].join("~")
}), i();
}, n();
}(), SelfEvent.prototype.on = function(t, e) {
t && "string" == typeof t && "function" == typeof e && (Array.isArray(this.eventMap[t]) ? -1 === this.eventMap[t].indexOf(e) && this.eventMap[t].push(e) : this.eventMap[t] = [ e ]);
}, SelfEvent.prototype.off = function(t, e) {
if (t && "string" == typeof t) if (e) {
if ("function" == typeof e && Array.isArray(this.eventMap[t])) {
var n = this.eventMap[t].indexOf(e);
n > -1 && this.eventMap[t].splice(n, 1);
}
} else delete this.eventMap[t];
}, SelfEvent.prototype.emit = function(t, e) {
t && "string" == typeof t && e && Array.isArray(this.eventMap[t]) && this.eventMap[t].forEach(function(t) {
t.call(e);
});
};

var pgcEvent = new SelfEvent("pgc");